User
Constructor
1new StringArrayManager(initialArray = [], options = {})
Parameters:
initialArray– Optional array of strings to initialize.options– Optional configuration object:
| Option | Type | Default | Description |
|---|---|---|---|
| maxHistory | number | 100 | Maximum undo history length |
| caseInsensitive | boolean | false | Normalize strings to lowercase for comparison |
| maxItems | number | Infinity | Maximum number of strings allowed |
| validate | function | null | Function (value) => boolean for custom validation |
| returnThis | boolean | false | If true, mutating methods return this instead of status objects |
| saveHistory | boolean | true | Enable/disable saving history for undo/redo |
Example:
1const manager = new StringArrayManager(["apple", "banana"], { caseInsensitive: true });